import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/Home.vue'
import A from '../views/A.vue'
import B from '../views/B.vue'
 

const routes = [
  {path: '/',name: 'home',component: HomeView},
  {path: '/a',name: 'a',component: A},
  {path: '/b',name: 'b',component: B},
  {path:"/:pathMatch(.*)",redirect:"/"}
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
